<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/base/jsp/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<%@ include file="/base/jsp/jscss.jsp"%>
	<title></title>
	<script type="text/javascript">
		$(function () {
			$('#dataList').datagrid({  
				
				url:'${ctx }/base/security/role/role!list_json.do',
			    title:'list',
			    pagination:true,
			    rownumbers:true,
			    singleSelect:true,
			    fitColumns: true,
			    toolbar:easyUi.initButton([{name:'add'}]),
			    frozenColumns:[[
				                {field:'ck',checkbox:true},
				                {title:'Code',field:'code',width:80,sortable:true}
							]],
			    columns:[[  
			            {field:'id',title:'编号',width:100},  
		                {field:'name',title:'名称',width:100},  
		                {field:'sort',title:'sort',width:100},  
		            ]],
			});
		});
		
		function add() {
			$("#addBean").css("display","");
			easyUi.form('addBean');
			easyUi.initButtonBar("formToolBar",[{name:'save'}]);
		}
		
		function save () {
			$("#form").submit();
		}
	</script>
</head>
<body>
	
	<div id="dataList"></div>
	<hr/>
	
	
	<div id='addBean' style="display: none;">
	<div id="formToolBar" class="datagrid-toolbar"></div>
	<form id="form" method="post" action="${ctx }/base/security/role/role!save.do">
		<table>
			<tr>
				<td>Name:</td>
				<td><input class="easyui-validatebox" type="text" name="bean.name" data-options="required:true"></input></td>
				
				<td>sort:</td>
				<td><input class="easyui-validatebox" type="text" name="bean.sort" data-options="required:true"></input></td>
			</tr>
			<tr>
				<td><input type="submit"/></td>
			</tr>
		</table>
	</form>
</div>
	
	
</body>
</html>